name: Gradle Dependency Submission

on:
  push:
    branches:
      - main

permissions:
  contents: write

jobs:
  dependency-submission:
    if: github.repository == 'junit-team/junit5'
    runs-on: ubuntu-latest
    steps:
    - name: Check out repository
      uses: actions/checkout@v4
      with:
        fetch-depth: 1
    - name: Setup Java
      uses: actions/setup-java@v4
      with:
        distribution: temurin
        java-version: 21
        check-latest: true
    - name: Generate and submit dependency graph
      uses: gradle/actions/dependency-submission@v3
